
import request from './request.js'

export const GetHomeList =()=>request.get('/index/index')
// 五个小跳转
export const Geticontiaozhuan =(id)=>request.get('/goods/category',{params:{id:id}})
// 跳转过来的商品
export const Getshaplist =(id)=>request.get('/goods/list',{params:{categoryId:id}})
// 品牌详情
export const Getppxiangqing =(id)=>request.get('/brand/detail',{params:{id:id}})
// 新品首发
export const Getxinpinshoufa =(id)=>request.get('/goods/detail',{params:{id:id}})
// 相关产品
export const Getxiangguanchanpin =(id)=>request.get('/goods/related',{params:{id:id}})
// 品牌详情
export const Getzhuantiyemian =(num)=>request.get('/topic/list',{params:{page:num}})
// 全部分类数据接口
export const Getfenlei =()=>request.get('/catalog/index',{params:{}})
// 获取当前分类数据
export const Getdqfenlei =(id)=>request.get('/catalog/current',{params:{id:id}})
// 图标详细
export const Gettubiaoxiangxi =(id)=>request.get('/goods/detail',{params:{id:id}})
// 搜索窗口数据
export const Getchuangkoushuju =()=>request.get('/search/index')
// 实时搜索列表
export const Getshishisousuo =(val)=>request.get('/search/helper',{params:{keyword:val}})
// 搜索框的商品
export const Getsousuogoods =(val,gdss,qjss)=>request.get('/goods/list',{params:{keyword:val,order:gdss,categoryId:qjss}})
export const Getsousuogoodss =(vals,gdss,qjss)=>request.get('/goods/list',{params:{keyword:vals,order:gdss,categoryId:qjss}})
// 点击历史搜索列表
// export const Getdjssss =(item)=>request.get('/goods/list',{params:{keyword:item}})
// 登录
export const Getdenglu =(username,pwd)=>request.post('/auth/loginByWeb',{username:username,pwd:pwd})
// 购物车数据
export const Getgowu=()=>request.get("/cart/index")
// 选商品
export const Getxuan=(isChecked,productIds)=>request.post("/cart/checked",{isChecked,productIds})
// 删商品
export const Getshan=(ids)=>request.post("/cart/delete",{productIds:ids})
// 步进器
export const Getbujinqi=(id,number,ids,idss)=>request.post("/cart/update",{goodsId:id,number:number,id:ids,productId:idss})
// 加商品
export const Getjia=(id,ids,num)=>request.post("/cart/add",{goodsId:id,productId:ids,number:num})